﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Data;
namespace TDT_Project.classes
{
    public class cls_nienkhoa
    {
       
        string _NienHoc_id = "";

        public string NienHoc_id
        {
            get { return _NienHoc_id; }
            set { _NienHoc_id = value; }
        }
        string _TenNienHoc = "";

        public string TenNienHoc
        {
            get { return _TenNienHoc; }
            set { _TenNienHoc = value; }
        }
        DateTime _NgayBatDau = DateTime.Now;

        public DateTime NgayBatDau
        {
            get { return _NgayBatDau; }
            set { _NgayBatDau = value; }
        }

        DateTime _NgayKetThuc = DateTime.Now;

        public DateTime NgayKetThuc
        {
            get { return _NgayKetThuc; }
            set { _NgayKetThuc = value; }
        }
        public DataSet load_nienkho_combo()
        {
            DataSet results = new DataSet();
            SqlConnection oConnection = new SqlConnection(cls_config.ConnectionString);
            SqlCommand oCommand = new SqlCommand("load_nienkho_combo", oConnection);
            oCommand.CommandType = CommandType.StoredProcedure;
            SqlDataAdapter da = new SqlDataAdapter();
            da.SelectCommand = oCommand;
            da.Fill(results);
            oConnection.Close();
            oConnection.Dispose();
            oConnection = null;
            return results;

        }
        public DataSet Get_TenTruong()
        {
            DataSet results = new DataSet();
            SqlConnection oConnection = new SqlConnection(cls_config.ConnectionString);
            SqlCommand oCommand = new SqlCommand("Get_TenTruong", oConnection);
            oCommand.CommandType = CommandType.StoredProcedure;
            SqlDataAdapter da = new SqlDataAdapter();
            da.SelectCommand = oCommand;
            da.Fill(results);
            oConnection.Close();
            oConnection.Dispose();
            oConnection = null;
            return results;

        }
    }
}